Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ash node module #1

Merged
merged 5 commits into from
Jan 11, 2023
Merged

Ash node module #1

merged 5 commits into from
Jan 11, 2023

Conversation

Nuttymoon
Copy link
Contributor

@Nuttymoon Nuttymoon commented Jan 11, 2023

This PR:

  • Initiates the repo as a Rust crate
  • Adds the ash::node module with the AshNode struct that allows interacting with the node's ID easily
  • Adds unit tests for ash::node

Note: I chose to keep 2 functions (from_cb58_id + from_bytes_id) for constructing an AshNode from a node's ID rather than implementing a trait like TryFrom (and having a single try_from function). It was making the code too complicated IMO.

src/node.rs Outdated Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
@Nuttymoon Nuttymoon merged commit 3e1a32c into main Jan 11, 2023
@Nuttymoon Nuttymoon deleted the ash-node-module branch January 11, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants